package com.yanmaohu.yulia.bean;

/**
 * @author Bright Lee
 */
public final class OldOrNewValuesAlias {

    private int beginIndex;
    private int endIndex;
    private boolean old;
    private boolean new_;
    private boolean row;
    private boolean table;
    private Identifier correlationNameOrTableAlias;

    public OldOrNewValuesAlias(int beginIndex,
                               boolean old,
                               boolean new_,
                               boolean row,
                               boolean table,
                               Identifier correlationNameOrTableAlias) {
        this.beginIndex = beginIndex;
        this.endIndex = correlationNameOrTableAlias.getEndIndex();
        this.old = old;
        this.new_ = new_;
        this.row = row;
        this.table = table;
        this.correlationNameOrTableAlias = correlationNameOrTableAlias;
    }

    public int getBeginIndex() {
        return beginIndex;
    }

    public int getEndIndex() {
        return endIndex;
    }

    public boolean isOld() {
        return old;
    }

    public boolean isNew() {
        return new_;
    }

    public boolean isRow() {
        return row;
    }

    public boolean isTable() {
        return table;
    }

    public Identifier getCorrelationNameOrTableAlias() {
        return correlationNameOrTableAlias;
    }

}
